<?php
/**
 * A simple description for this script
 *
 * PHP Version 5.2.0 or Upper version
 *
 * @package    Paylog
 * @author     Hidehito NOZAWA aka Suin <http://suin.asia>
 * @copyright  2010 Hidehito NOZAWA
 * @license    http://www.gnu.org/licenses/gpl-2.0.html GNU GPL v2
 *
 */

class Paylog_Class_Smarty
{
	public static function raw($str)
	{
		return htmlspecialchars_decode($str, ENT_QUOTES);
	}

	public static function msg()
	{
	
	}

	public static function url($params, &$smarty)
	{
		if ( isset($params['dirname']) )
		{
			$dirname = $params['dirname'];
		}
		else
		{
			$dirname = null;
		}

		return Paylog::url($dirname, null, null, $params);
	}

	public static function currency($num)
	{
		$decimals     = Paylog::msg('.decimals');
		$decPoint     = Paylog::msg(',dec_point');
		$thousandsSep = Paylog::msg(',thousands_sep');
		return number_format($num, $decimals, $decPoint, $thousandsSep);
	}
}

?>
